iremap_entries, iremap_entry);
memset(iremap_entry, 0, sizeof(struct iremap_entry));
- iommu_flush_cache_entry(iremap_entry);
+ iommu_flush_cache_entry(iremap_entry, sizeof(struct iremap_entry));
iommu_flush_iec_index(iommu, 0, index);
unmap_vtd_domain_page(iremap_entries);
}
memcpy(iremap_entry, &new_ire, sizeof(struct iremap_entry));
- iommu_flush_cache_entry(iremap_entry);
+ iommu_flush_cache_entry(iremap_entry, sizeof(struct iremap_entry));
iommu_flush_iec_index(iommu, 0, index);
invalidate_sync(iommu);
remap_rte->data = 0;
memcpy(iremap_entry, &new_ire, sizeof(struct iremap_entry));
- iommu_flush_cache_entry(iremap_entry);
+ iommu_flush_cache_entry(iremap_entry, sizeof(struct iremap_entry));
iommu_flush_iec_index(iommu, 0, index);
invalidate_sync(iommu);
static unsigned int clflush_size;
static int iommus_incoherent;
-static void __iommu_flush_cache(void *addr, int size)
+static void __iommu_flush_cache(void *addr, unsigned int size)
{
int i;
cacheline_flush((char *)addr + i);
}
-void iommu_flush_cache_entry(void *addr)
+void iommu_flush_cache_entry(void *addr, unsigned int size)
{
- __iommu_flush_cache(addr, 8);
+ __iommu_flush_cache(addr, size);
}
void iommu_flush_cache_page(void *addr, unsigned long npages)
}
set_root_value(*root, maddr);
set_root_present(*root);
- iommu_flush_cache_entry(root);
+ iommu_flush_cache_entry(root, sizeof(struct root_entry));
}
maddr = (u64) get_context_addr(*root);
unmap_vtd_domain_page(root_entries);
*/
dma_set_pte_readable(*pte);
dma_set_pte_writable(*pte);
- iommu_flush_cache_entry(pte);
+ iommu_flush_cache_entry(pte, sizeof(struct dma_pte));
}
else
{
return;
}
- dma_clear_pte(*pte);
+ dma_clear_pte(*pte);
spin_unlock(&hd->mapping_lock);
- iommu_flush_cache_entry(pte);
+ iommu_flush_cache_entry(pte, sizeof(struct dma_pte));
/* No need pcidevs_lock here since do that on assign/deassign device*/
for_each_drhd_unit ( drhd )
iommu_free_pagetable(dma_pte_addr(*pte), next_level);
dma_clear_pte(*pte);
- iommu_flush_cache_entry(pte);
+ iommu_flush_cache_entry(pte, sizeof(struct dma_pte));
}
unmap_vtd_domain_page(pt_vaddr);
context_set_address_width(*context, agaw);
context_set_fault_enable(*context);
context_set_present(*context);
- iommu_flush_cache_entry(context);
+ iommu_flush_cache_entry(context, sizeof(struct context_entry));
spin_unlock(&iommu->lock);
/* Context entry was previously non-present (with domid 0). */
context_clear_present(*context);
context_clear_entry(*context);
- iommu_flush_cache_entry(context);
+ iommu_flush_cache_entry(context, sizeof(struct context_entry));
if ( iommu_flush_context_device(iommu, domain_iommu_domid(domain),
(((u16)bus) << 8) | devfn,
if ( iommu_snoop )
dma_set_pte_snp(*pte);
- iommu_flush_cache_entry(pte);
+ iommu_flush_cache_entry(pte, sizeof(struct dma_pte));
spin_unlock(&hd->mapping_lock);
unmap_vtd_domain_page(page);